package LUCKY.Android;

import org.acra.ACRA;
import org.acra.ReportingInteractionMode;
import org.acra.annotation.ReportsCrashes;


import android.app.Application;


//http://code.google.com/p/acra/wiki/AdvancedUsage#Toast_notification
//@ReportsCrashes(formKey = "dG1LUmM1Mjg2MzFIZDNqeUpUWUpGZnc6MQ", mode = ReportingInteractionMode.TOAST, resToastText = R.string.crash_toast_text)
public class MyApplication extends Application {

	@Override
	public void onCreate() {
		// The following line triggers the initialization of ACRA
		ACRA.init(this);
		super.onCreate();
	}

	// Sirve de base para saber si alguna actividad de la aplicacion es visible
	// para poder pausar/activar el timertask de sincronizacion
	// http://stackoverflow.com/questions/3667022/android-is-application-running-in-background/5862048#5862048
	// public static boolean isActivityVisible() {
	// return valoresGenerales.activityVisible;
	// }

	public static void activityResumed() {
		valoresGenerales.activityVisible = true ;
	}

	public static void activityPaused() {
		
	//se pone en true para q siga funcionando 
		//en segundo plano
		valoresGenerales.activityVisible = false;
		
	}
	// private static boolean activityVisible;

}
